
#include "qtHarbour.ch"

FUNCTION Main()
  LOCAL qtApp
  LOCAL wnd
  LOCAL twi
  LOCAL btn
  LOCAL x,y

  qtApp := QApplication():New()

  wnd := QTableWidget():New( 10, 2 )

  ? wnd:ClassName

  FOR x:=1 TO wnd:rowCount
    FOR y:=1 TO wnd:columnCount
      ? x,y
      twi := QTableWidgetItem():New( LTrim( Str( x ) ) + ", " + LTrim( Str( y ) ) )
      wnd:setItem( x, y, twi )
      ? wnd:item( x, y ):row, wnd:item( x, y ):column
    NEXT
  NEXT

  wnd:resize( 320, 240 )

  wnd:setWindowTitle( "Hello world..." )

  wnd:show()

  btn := QPushButton():New( "Press me", wnd )

  btn:move( 100, 100 )

  btn:show()

  btn:connect( btn, SIGNAL(clicked()), qtApp, SLOT(quit()) )

  qtApp:exec()

  ? "Finished..."

RETURN NIL
